home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 46 / Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso / -in_the_mag- / reader_requests / scilab / demos / fec / fec.ex1 < prev    next >
Text File  |  1999-09-16  |  464b  |  25 lines

  1. // A small example of MESH Creation 
  2. // and visualisation of a linear on triangles function 
  3. getf('SCI/demos/fec/macros.sci')
  4. N=20;
  5. n=1:N;
  6. x=cos(n*2*%pi/N);
  7. y=sin(n*2*%pi/N);
  8. noeuds=N
  9. noeul=[(1:(N))',x',y',0*ones(N,1)];
  10. noeul=[noeul;(N+1),0,0,0];
  11. trianl=[]
  12. for i=1:(N-1),trianl=[trianl;i,i,i+1,N+1,0];end
  13. trianl=[trianl;N,N,1,N+1,0];
  14. triang=N;
  15. rect=[-1.2,-1.2,1.2,1.2]
  16. fec(noeul(:,2),noeul(:,3),trianl,(1:N+1)',"030"," ",rect);
  17. meshvisu(rect)
  18. halt();
  19. xbasc()
  20.  
  21.  
  22.  
  23.  
  24.  
  25.